import { createRouter, createWebHistory } from 'vue-router';
const router = createRouter({
	history: createWebHistory(),
	routes: [
		{
			path: '',
			redirect: '/home'
		},
		{
			path: '/home',
			component: () => import('@/views/home/index.vue'),
			children: [
				{
					path: '/home/resource',
					component: () => import("@/components/Body/components/Resource/index.vue"),
					children: [
						{
							path: "/home/resource/recommend",
							component: () => import("@/components/Body/components/Resource/components/LoadMoreList/index.vue")
						},
						{
							path:"/home/resource/information",
							component: () => import("@/components/Body/components/Resource/components/LoadMoreList/index.vue")
						},
						{
							path:"/home/resource/attention",
							component: () => import("@/components/Body/components/Resource/components/Attention/index.vue")
						},
						{
							path:'',
							redirect:'/home/resource/recommend'
						},
						//original
						{
							path:"/home/resource/original",
							component: () => import("@/components/Body/components/Resource/components/LoadMoreList/index.vue")
						},
						//course
						{
							path:"/home/resource/course",
							component: () => import("@/components/Body/components/Resource/components/LoadMoreList/index.vue")
						},
						//specialTopic
						{
							path:"/home/resource/specialTopic",
							component: () => import("@/components/Body/components/Resource/components/LoadMoreList/index.vue")
						},
					]
				},
				{
					path: '/home/course',
					component: () => import("@/components/Body/components/Course/index.vue"),
					children: [
						{
							name: 'VIP_ZONE',
							path: '/home/course/vip_zone',
							component: () => import("@/components/Body/components/Course/vip_zone/index.vue")
						},
						{
							name: 'VideoCourse',
							path: '/home/course/video_courses',
							component: () => import("@/components/Body/components/Course/video_courses/index.vue")
						},
						{
							name: 'LiveCourse',
							path: '/home/course/live_courses',
							component: () => import("@/components/Body/components/Course/live_course/index.vue")
						},
						{
							name: 'MajorCourses',
							path: '/home/course/major_courses',
							component: () => import("@/components/Body/components/Course/major_courses/index.vue")
						},
						{
							path: '/home/course/zone_list',
							component: () => import("@/components/Body/components/Course/zone_list/index.vue")
						},
						{
							path:'',
							redirect:'/home/course/vip_zone'
						}
					]
				},
				{
					path:'/home/center',
					component:() => import("@/components/Body/components/center/index.vue"),
					children: [
						{
							path: '/home/center/dynamics',
							meta: { title: '资源动态' },
							component: () => import("@/components/Body/components/center/components/Dynamics/index.vue")
						},
						{
							path: '/home/center/my_member',
							meta: { title: '资源动态' },
							component: () => import("@/components/Body/components/center/components/My_member/index.vue")
						},
						{
							path: '/home/center/wallet',
							meta: { title: '我的钱包' },
							component: () => import("@/components/Body/components/center/components/Wallet/index.vue")
						},
						{
							path: '/home/center/coupons',
							meta: { title: '我的优惠券' },
							component: () => import("@/components/Body/components/center/components/Coupons/index.vue")
						},
						{
							path: '/home/center/buyer',
							meta: { title: '我买的订单' },
							component: () => import("@/components/Body/components/center/components/Buyer/index.vue")
						},
						{
							path: '/home/center/seller',
							meta: { title: '我的钱包' },
							component: () => import("@/components/Body/components/center/components/Seller/index.vue")
						},
						{
							path: '/home/center/edit_info',
							meta: { title: '我卖的' },
							component: () => import("@/components/Body/components/center/components/Edit_info/index.vue")
						},
						{
							path: '',
							redirect: '/home/center/dynamics'
						},
					]
				},
				{
					path: '/home/training',
					component: () => import("@/components/Body/components/Training/index.vue"),
					children: [
						{
							path: '/home/training/myroom',
							component: () => import('@/components/Body/components/Training/components/MyRoom/index.vue')
						},
			
						{
							path: '/home/training/mediaCache',
							component: () => import('@/components/Body/components/Training/components/MediaCache/index.vue')
						},
						
						{
							path: '/home/training/collections',
							component: () => import('@/components/Body/components/Training/components/Collections/index.vue')
						},
			
						{
							path: '/home/training/view_records',
							component: () => import('@/components/Body/components/Training/components/ViewRecords/index.vue')
						},
						{
							path:'',
							redirect:'/home/training/myroom'
						}
					]
				},
				{
					name:'Communication',
					path:'/home/communication',
					component:()=>import("@/components/Body/components/Communication/index.vue"),
					children:[
						{
							name:'SystemNote',
							path:'/home/communication/systemNote',
							component:() =>import("@/components/Body/components/Communication/systemNote/index.vue"),
						},
						{
							name:'InteractNote',
							path:'/home/communication/interactNote',
							component:() =>import("@/components/Body/components/Communication/interactNote/index.vue"),
						},
						{
							name:'OrderNote',
							path:'/home/communication/orderNote',
							component:() =>import("@/components/Body/components/Communication/orderNote/index.vue"),
						},
						{
							path:'',
							redirect:'/home/communication/systemNote'
						}
					]
				},
				{
					path:'',
					redirect:'/home/resource'
				}
				
			]
		},
		{

			path: '/login',
			component: () => import('@/views/login/index.vue')

		}
	]
})
export default router
